#include "service.h"
#include <iostream>
using namespace std;

int main() {
    try {
        Service service{};
        service.monitor();
        string msg{};
        while (true) {
            getline(cin, msg);
            if(msg == "quit") break;
            service.allSend(msg.c_str());
        }
    }catch (const char* err) {
        cout<<err;
    }
}